package com.qdu.bean;

import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class EverydayBean implements Writable {
    private int count;
    private  int casual;
    private int registered;

    public EverydayBean(int count, int casual, int registered) {
        this.count = count;
        this.casual = casual;
        this.registered = registered;
    }

    public EverydayBean() {
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getCasual() {
        return casual;
    }

    public void setCasual(int casual) {
        this.casual = casual;
    }

    public int getRegistered() {
        return registered;
    }

    public void setRegistered(int registered) {
        this.registered = registered;
    }

    @Override
    public void write(DataOutput dataOutput) throws IOException {
        dataOutput.writeInt(count);
        dataOutput.writeInt(casual);
        dataOutput.writeInt(registered);

    }

    @Override
    public void readFields(DataInput dataInput) throws IOException {
        count = dataInput.readInt();
        casual = dataInput.readInt();
        registered = dataInput.readInt();
    }

    @Override
    public String toString() {
        return count+" "+ casual+" " + registered ;
    }
}
